package cn.tmall.service;

import cn.tmall.pojo.Order;
import cn.tmall.pojo.OrderItem;

import java.util.List;

public interface OrderItemService {
    public void add(OrderItem orderItem);
    public void delete(int id);
    public void update(OrderItem orderItem);
    public OrderItem get(int id);
    public List<OrderItem> list();

    public void fill(Order order);  //给Order计算total、totalNumber与orderItems
    public void fill(List<Order> orderList);
    public int getSaleCount(int pid);   //计算产品总销量

    List<OrderItem> listByUser(int uid);
}
